package com.rc.pojo.po.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class MaintenanceTableDef extends TableDef {

    /**
     * 实体类。

 @author 27806
 @since 2024-07-01
     */
    public static final MaintenanceTableDef MAINTENANCE = new MaintenanceTableDef();

    public final QueryColumn ID = new QueryColumn(this, "id");

    public final QueryColumn IMG = new QueryColumn(this, "img");

    public final QueryColumn TASK_ID = new QueryColumn(this, "task_id");

    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    public final QueryColumn EMPLOYEE_ID = new QueryColumn(this, "employee_id");

    public final QueryColumn PLANT_ITEM_ID = new QueryColumn(this, "plant_item_id");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, IMG, TASK_ID, CREATE_TIME, EMPLOYEE_ID, PLANT_ITEM_ID};

    public MaintenanceTableDef() {
        super("rc", "maintenance");
    }

    private MaintenanceTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public MaintenanceTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new MaintenanceTableDef("rc", "maintenance", alias));
    }

}
